package com.alibaba.bink;

import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.datastream.KeyedStream;
import org.apache.flink.streaming.api.datastream.SingleOutputStreamOperator;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.streaming.api.functions.ProcessFunction;
import org.apache.flink.util.Collector;

import java.util.ArrayList;
import java.util.List;

/**
 * @author galeno
 * @Title:
 * @Description:
 * @date 2021/10/2822:49
 */
public class SumStateDemo {
    public static void main(String[] args) {
        StreamExecutionEnvironment e = StreamExecutionEnvironment.getExecutionEnvironment();
        DataStreamSource<String> lines = e.socketTextStream("192.168.77.3", 9999);
        SingleOutputStreamOperator<Integer> maped = lines.map(Integer::parseInt);
        KeyedStream<Integer, Integer> keyedStream = maped.keyBy(v -> v % 2);



    }
}
